<div class="grid_container">
    <div class="grid_12" style="width: 300px">
        <div class="widget_wrap">
            <div class="widget_top">
                <span class="h_icon list"></span>
                <h6>
                    Paciente:
                    <?php //debug($datosGinecologicos); ?>
                    <?php echo $datosPaciente['Paciente']['nombres']; ?> 
                    <?php echo $datosPaciente['Paciente']['ap_paterno']; ?> 
                    <?php echo $datosPaciente['Paciente']['ap_materno']; ?>   
                </h6>
            </div>
            <div class="widget_content">
                <!--                    <form id="signupform" autocomplete="off" method="get" action="#" class="form_container left_label">-->
                <?php echo $this->Form->create('Antecedentesginecologico', array('class' => 'form_container left_label')); ?>        
                <?php echo $this->Form->hidden('consultasexterna_id', array('value' => $idConsulta)); ?>
                <?php echo $this->Form->hidden('paciente_id', array('value' => $idPaciente)); ?>
                <ul>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lfirstname" for="firstname">Menarca</label>
                            <div class="form_input">
<!--                                <input id="firstname" name="firstname" type="text" value="" maxlength="100" class="large"/>-->
                                <input type="number" name="data[Antecedentesginecologico][menarca]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['menarca']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="llastname" for="lastname">Menopausa</label>
                            <div class="form_input">
                                <input type="number" name="data[Antecedentesginecologico][menopausa]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['menopausa']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lusername" for="username">F.U.M.</label>
                            <div class="form_input">
                                <input type="date" name="data[Antecedentesginecologico][fum]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['fum']; ?>" style="width: 150px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lpassword" for="password">G (Gestas)</label>
                            <div class="form_input">
                                <input type="number" name="data[Antecedentesginecologico][g]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['g']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lpassword_confirm" for="password_confirm">P (Partos)</label>
                            <div class="form_input">
                                <input type="number" name="data[Antecedentesginecologico][p]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['p']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lemail" for="email">A (Abortos)</label>
                            <div class="form_input">
                                <input type="number" name="data[Antecedentesginecologico][a]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['a']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lemail" for="email">C (Cesareas)</label>
                            <div class="form_input">
                                <input type="number" name="data[Antecedentesginecologico][c]" value="<?php echo $datosGinecologicos['Antecedentesginecologico']['c']; ?>" style="width: 50px;">
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="form_grid_12">
                            <label class="field_title" id="lemail" for="email">Notas</label>
                            <div class="form_input">                               
                                <?php echo $this->Form->textarea('nota'); ?>
                            </div>
                        </div>
                    </li>                    
                    <li>
                        <div class="form_grid_12" id="divGuardar">
                            <div class="form_input">
                                <button id="signupsubmit" type="submit" id="btGuardar" class="btn_small btn_blue" onclick="acciones()"><span>Registrar</span></button>
                            </div>
                        </div>
                        <div class="form_grid_12" id="imgEspera" style="display: none;">
                            <div class="form_input">
                                <img src="<?php echo $this->webroot; ?>/images/ajax-loader/ajax-loader(9).gif">
                            </div>
                        </div>
                    </li>
                </ul>
                </form>
            </div>
        </div>
    </div>
</div>
<span class="clear"></span>
<script>
    function acciones(){
        $('#divGuardar').hide();
        $('#imgEspera').toggle();
        //var boton = document.getElementById('divGuardar');        
        //boton.parentNode.removeChild(boton);
        //boton.submit();
        
        //document.getElementById('imgEspera').style.display='block';                
        //document.getElementById('imgEspera').style.width='10px';
        //return false;
        //document.forms.submit();
    }
    //$(document).ready(function() {
        //$("#bgGuardar").mouseover(function() {
//            $('#divGuardar').hide();
            //$('#imgEspera').toggle();
            //console.log('es jquery');
        //});
    //});
</script>